package com.flca.frw.util;

public class HashUtil {

	final static int PRIME = 31;

	private HashUtil()
	{
	}

	public static  int calcHash(int currvalue, Object property) {
		if (property != null) {
			return currvalue + Math.abs(PRIME * property.hashCode());
		} else {
			return currvalue;
		}
	}

	public static  int calcHash(long currvalue, Object property) {
		if (property != null) {
			return (int) currvalue + Math.abs(PRIME * property.hashCode());
		} else {
			return (int) currvalue;
		}
	}
}
